﻿<?xml version="1.0" encoding="utf-8" ?>
<c2eventsheet>
    <!--All the 'name' attributes are ignored by Construct 2 - they are there for readability only.-->
    <name>Level Event Sheet</name>
    <events>
        <comment>Mirror the player&apos;s image so they appear facing the right way when moving left or right.</comment>
        <event-block any="1">
            <conditions>
                <condition id="0" name="On key pressed" type="Keyboard">
                    <param id="0" name="Key">37 (Left arrow)</param>
                </condition>
            </conditions>
            <actions>
                <action id="7" name="Set mirrored" type="Player">
                    <param id="0" name="State">0</param>
                </action>
            </actions>
        </event-block>
        <event-block any="1">
            <conditions>
                <condition id="0" name="On key pressed" type="Keyboard">
                    <param id="0" name="Key">39 (Right arrow)</param>
                </condition>
            </conditions>
            <actions>
                <action id="7" name="Set mirrored" type="Player">
                    <param id="0" name="State">1</param>
                </action>
            </actions>
        </event-block>
        <comment>If the player falls off the bottom of the layout, restart the level.</comment>
        <event-block>
            <conditions>
                <condition id="-2" name="Compare Y" type="Player">
                    <param id="0" name="Comparison">4</param>
                    <param id="1" name="Y co-ordinate">LayoutHeight</param>
                </condition>
            </conditions>
            <actions>
                <action id="-26" name="Restart layout" type="System" />
            </actions>
        </event-block>
        <event-block>
            <conditions>
                <condition id="4" name="Is touching object" type="Touch">
                    <param id="0" name="Object">TouchUp</param>
                </condition>
            </conditions>
            <actions>
                <action behavior="Platform" id="7" name="Simulate control" type="Player">
                    <param id="0" name="Control">2</param>
                </action>
            </actions>
        </event-block>
        <event-block>
            <conditions>
                <condition id="4" name="Is touching object" type="Touch">
                    <param id="0" name="Object">TouchRight</param>
                </condition>
            </conditions>
            <actions>
                <action behavior="Platform" id="7" name="Simulate control" type="Player">
                    <param id="0" name="Control">1</param>
                </action>
                <action id="7" name="Set mirrored" type="Player">
                    <param id="0" name="State">1</param>
                </action>
            </actions>
        </event-block>
        <event-block>
            <conditions>
                <condition id="4" name="Is touching object" type="Touch">
                    <param id="0" name="Object">TouchLeft</param>
                </condition>
            </conditions>
            <actions>
                <action behavior="Platform" id="7" name="Simulate control" type="Player">
                    <param id="0" name="Control">0</param>
                </action>
                <action id="7" name="Set mirrored" type="Player">
                    <param id="0" name="State">0</param>
                </action>
            </actions>
        </event-block>
        <event-block>
            <conditions>
                <condition id="4" name="Is touching object" type="Touch">
                    <param id="0" name="Object">SoundOff</param>
                </condition>
            </conditions>
            <actions>
                <action id="6" name="Stop" type="Audio">
                    <param id="0" name="Tag">&quot;&quot;</param>
                </action>
            </actions>
        </event-block>
        <event-block>
            <conditions>
                <condition id="4" name="Is touching object" type="Touch">
                    <param id="0" name="Object">SoundOn</param>
                </condition>
            </conditions>
            <actions>
                <action id="7" name="Play (by name)" type="Audio">
                    <param id="0" name="Folder">1</param>
                    <param id="1" name="Audio file name">&quot;MattOglseby - 1&quot;</param>
                    <param id="3" name="Loop">0</param>
                    <param id="4" name="Volume">0</param>
                    <param id="2" name="Tag (optional)">&quot;&quot;</param>
                </action>
            </actions>
        </event-block>
        <event-block>
            <conditions>
                <condition id="0" name="On collision with another object" type="Level1Complete">
                    <param id="0" name="Object">Player</param>
                </condition>
            </conditions>
            <actions>
                <action id="-2" name="Go to layout" type="System">
                    <param id="0" name="Layout">Level2</param>
                </action>
            </actions>
        </event-block>
        <event-block>
            <conditions>
                <condition id="0" name="On collision with another object" type="GameEnd">
                    <param id="0" name="Object">Player</param>
                </condition>
            </conditions>
            <actions>
                <action id="-2" name="Go to layout" type="System">
                    <param id="0" name="Layout">GameOver</param>
                </action>
            </actions>
        </event-block>
    </events>
</c2eventsheet>
